//
//  RecentMentionsVC.m
//  LeftRightSlider
//
//  Created by QQ on 15-8-18.
//  Copyright (c) 2015年 heroims. All rights reserved.
//

#import "RecentMentionsVC.h"

@interface RecentMentionsVC ()

@end

@implementation RecentMentionsVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    {
        self.navigationController.navigationBar.hidden = YES;
        
        UIView *indicateView = [[UIView alloc] initWithFrame:CGRectMake(0,0, 320, NAVIGATION_CONTROLLER_HEIGHT)];
        //Title区域显示标题
        UILabel * titleTextLb = [[UILabel alloc] init];
        // 左导航按钮
        UIButton *backbtn = [UIButton buttonWithType:UIButtonTypeCustom];
        //右导航按钮
        UIButton *rightBut = [UIButton buttonWithType:UIButtonTypeCustom];
        
        if(IOS_VERSION >= 7.0)
        {
            indicateView.backgroundColor = [UIColor colorWithHexadecimalString:@"#f7f7f7" withColorAlpha:1.0];
            //[UIColor colorWithPatternImage:[UIImage imageNamed:@"public_top_bar_ios7.png"]];
            titleTextLb.frame = CGRectMake(50,20, 220, NAVIGATION_TITLE_HEIGHT);
            backbtn.frame = CGRectMake(0,20, 45, 44);
            rightBut.frame = CGRectMake(self.view.frame.size.width - 45, 20, 45, 44);
        }
        else
        {
            indicateView.backgroundColor = [UIColor colorWithHexadecimalString:@"#f7f7f7" withColorAlpha:1.0];//[UIColor colorWithPatternImage:[UIImage imageNamed:@"public_top_bar.png"]];
            titleTextLb.frame = CGRectMake(50,self.view.frame.origin.y,220, NAVIGATION_TITLE_HEIGHT);
            backbtn.frame = CGRectMake(0,0, 45, 44);
            rightBut.frame = CGRectMake(self.view.frame.size.width - 45, 0, 45, 44);
        }
        
        self.view.backgroundColor = [UIColor colorWithHexadecimalString:@"#EBEBEB" withColorAlpha:1.0];
        
        //Title区域显示标题
        [titleTextLb setBackgroundColor:[UIColor clearColor]];
        [titleTextLb setTextAlignment:NSTextAlignmentCenter];
        [titleTextLb setFont:[UIFont fontWithName:@"Helvetica"size:17.0]];
        [titleTextLb setTextColor:[UIColor colorWithHexadecimalString:@"#1a1a1a"withColorAlpha:1]];
        [indicateView addSubview:titleTextLb];
        
        titleTextLb.text = @"Recent Mentions";
        
        // 左导航按钮
        backbtn.backgroundColor = [UIColor clearColor];
        [backbtn setImage:[UIImage imageNamed:@"back_button"] forState:UIControlStateNormal];
        [backbtn setImage:[UIImage imageNamed:@"back_button"] forState:UIControlStateHighlighted];
        [backbtn addTarget:self action: @selector(backBtn:) forControlEvents: UIControlEventTouchUpInside];
        [indicateView addSubview:backbtn];
        
        [self.view addSubview:indicateView];
        
        UIImageView *sepLine = [[UIImageView alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(indicateView.frame)-1, SCREEN_WIDTH, 1)];
        sepLine.backgroundColor = [UIColor colorWithHexadecimalString:@"#d0d0d3" withColorAlpha:1.0];
        [indicateView addSubview:sepLine];
    }
}

- (void)backBtn:(UIButton *)btn
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
